<div ng-controller="Deploy.AddHost.Ctrl" ng-container="{}">
   <div style="border-bottom:1px solid #eee;" step-chart="stepList"></div>
   <div style="padding:10px 15px;" ng-container="{offsetY:-70}">
      <div ng-container="{offsetY:-45}">
         <!--主机列表-->
         <div class="pull-left" ng-container="{width:400}" ng-controller="Deploy.AddHost.HostList.Ctrl">
            <div style="height:30px;font-size:110%;font-weight:bold;">{{autoLanguage("主机列表")}}</div>
            <div class="borderBox" style="padding:10px;" ng-container="{offsetY:-30}">
               <div style="height:40px;">
                  <div class="pull-left" style="height:33px;width:28px;padding-top:7px;"><i class="fa fa-search"></i></div>
                  <div class="pull-left" style="height:40px;width:350px;">
                     <input class="form-control" ng-model="Search.text" ng-change="Filter()"/>
                  </div>
                  <div class="clear-float"></div>
               </div>
               <div class="borderBox" style="overflow-y:auto;" ng-container="{maxHeight:'100%',offsetY:-40}">
                  <!--repeat 主机列表-->
                  <div style="height:55px;border-top:1px solid #fff;cursor:pointer;" ng-repeat="HostInfo in HostInfoList track by $index" ng-style="{true:{'border-top':'1px solid #E3E7E8'}}[$index>0]">
                     <div style="height:47px;margin:1px;border:3px solid #fff;" ng-style="{true:{'border-color':'#80c0ff','background':HostInfo['background']},false:{'border-color':HostInfo['background'],'background':HostInfo['background']}}[CurrentHost==$index]">
                        <table class="table" style="height:47px;">
                           <tr>
                              <td style="padding-left:10px;width:30px;">
                                 <div style="font-size:130%;cursor:pointer;">
                                    <i class="fa" ng-click="CheckedHost($index)" ng-class="{true:'fa-check-square-o',false:'fa-square-o','undefined':'fa-square-o'}[HostInfo['IsUse']]"></i>
                                 </div>
                              </td>
                              <td ng-click="SwitchHost($index)">
                                 <div class="Ellipsis">
                                    <span ng-style="{'true':{'background':'#ffffab'},'false':{'background':HostInfo['background']}}[HostInfo['IsHostName']==true]">
                                       {{HostInfo['HostName']}}
                                    </span>
                                 </div>
                                 <div class="Ellipsis" style="font-size:90%;color:#888;padding-top:3px;">
                                    <span ng-style="{'true':{'background':'#ffffab'},'false':{'background':HostInfo['background']}}[HostInfo['IsIP']==true]">
                                       {{HostInfo['IP']}}
                                    </span>
                                 </div>
                              </td>
                              <td style="padding:0 10px;width:60px;text-align:right;" ng-if="HostInfo['CanUse'] != false" ng-click="SwitchHost($index)">
                                 <span class="badge badge-warning" ng-if="HostInfo['CanNotUseNum']>0" data-desc="{{HostInfo['DiskWarning']}}">
                                    {{HostInfo['CanNotUseNum']}}
                                 </span>
                              </td>
                              <td style="padding:0 10px;width:60px;text-align:right;" ng-if="HostInfo['CanUse'] == false" ng-click="SwitchHost($index)">
                                 <span class="badge badge-danger" ng-if="HostInfo['errno'] != 0" data-desc="{{HostInfo['detail']}}">
                                    {{autoLanguage("错误")}}
                                 </span>
                                 <span class="badge badge-info" ng-if="HostInfo['IsUseNum'] == 0" data-desc="{{autoLanguage('至少选择一个磁盘，主机才可以安装业务。')}}">
                                    {{autoLanguage("提示")}}
                                 </span>
                              </td>
                           </tr>
                        </table>
                     </div>

                     <!--
                     <div style="height:47px;margin:1px;border:3px solid;background:#eee;" ng-if="HostInfo['CanUse'] == false" ng-style="{true:{'border-color':'#80c0ff'},false:{'border-color':'#eee'}}[CurrentHost==$index]">
                        <table class="table" style="margin-top:5px;">
                           <tr>
                              <td style="padding-left:10px;width:30px;">
                                 <div style="font-size:130%;">
                                    <i class="fa" ng-class="{true:'fa-check-square-o',false:'fa-square-o','undefined':'fa-square-o'}[HostInfo['IsUse']]"></i>
                                 </div>
                              </td>
                              <td ng-click="SwitchHost($index)">
                                 <div class="Ellipsis">
                                    <span ng-style="{'true':{'background':'#ffffab'},'false':{'background':'#eee'}}[HostInfo['IsHostName']==true]">
                                       {{HostInfo['HostName']}}
                                    </span>
                                 </div>
                                 <div class="Ellipsis" style="font-size:90%;color:#888;padding-top:3px;">
                                    <span ng-style="{'true':{'background':'#ffffab'},'false':{'background':'#eee'}}[HostInfo['IsIP']==true]">
                                       {{HostInfo['IP']}}
                                    </span>
                                 </div>
                              </td>
                              <td style="padding:0 10px;width:60px;text-align:right;" ng-click="SwitchHost($index)">
                                 <span class="badge badge-danger" ng-if="HostInfo['errno'] != 0" data-desc="{{HostInfo['detail']}}">
                                    {{autoLanguage("错误")}}
                                 </span>
                                 <span class="badge badge-info" ng-if="HostInfo['IsUseNum'] == 0" data-desc="{{autoLanguage('至少选择一个磁盘，主机才可以安装业务。')}}">
                                    {{autoLanguage("提示")}}
                                 </span>
                              </td>
                           </tr>
                        </table>
                     </div>
                     -->
                  </div>
                  <!--repeat-->
               </div>
            </div>
         </div>

         <!--主机配置-->
         <div class="pull-left" ng-container="{offsetX:-410,marginLeft:10}" ng-controller="Deploy.AddHost.HostInfo.Ctrl">

            <div style="height:30px;font-size:110%;font-weight:bold;">{{autoLanguage("主机配置")}}</div>
            <div class="borderBox" style="position:relative;padding:10px;overflow-y:auto;overflow-x:hidden;" ng-container="{offsetY:-30}">

               <div style="height:25px;">{{autoLanguage("系统信息")}}</div>
               <div>
                  <table class="table loosen simple" style="color:#666;font-size:90%;">
                     <tr>
                        <td style="width:120px;font-weight:bold;">{{autoLanguage("主机名")}}</td>
                        <td>{{HostInfo['HostName']}}</td>
                     </tr>
                     <tr>
                        <td style="width:120px;font-weight:bold;">{{autoLanguage("IP地址")}}</td>
                        <td>{{HostInfo['IP']}}</td>
                     </tr>
                     <tr>
                        <td style="width:120px;font-weight:bold;">{{autoLanguage("操作系统")}}</td>
                        <td>
                           {{HostInfo['OS']['Description']}} <span ng-if="HostInfo['OS']['Bit']">x{{HostInfo['OS']['Bit']}}</span>
                        </td>
                     </tr>
                     <tr ng-if="HostInfo['Safety']['Name'].length > 0">
                        <td style="width:120px;font-weight:bold;">{{autoLanguage("防火墙")}}</td>
                        <td>
                           {{HostInfo['Safety']['Name']}} {{HostInfo['Safety']['IsRunning']}}
                        </td>
                     </tr>
                  </table>
               </div>

               <div style="height:25px;margin-top:20px;">{{autoLanguage("SAC代理")}}</div>
               <div>
                  <table class="table loosen simple" style="color:#666;font-size:90%;">
                     <tr>
                        <td style="width:120px;font-weight:bold;">{{autoLanguage("版本")}}</td>
                        <td>{{HostInfo['OMA']['Version']}}</td>
                     </tr>
                     <tr>
                        <td style="width:120px;font-weight:bold;">{{autoLanguage("编译版本")}}</td>
                        <td>{{HostInfo['OMA']['Release']}}</td>
                     </tr>
                     <tr>
                        <td style="width:120px;font-weight:bold;">{{autoLanguage("用户")}}</td>
                        <td>{{HostInfo['OMA']['SdbUser']}}</td>
                     </tr>
                     <tr>
                        <td style="width:120px;font-weight:bold;">{{autoLanguage("服务名")}}</td>
                        <td>{{HostInfo['OMA']['Service']}}</td>
                     </tr>
                     <tr>
                        <td style="width:120px;font-weight:bold;">{{autoLanguage("安装路径")}}</td>
                        <td>
                           <span ng-if="HostInfo['OMA']['Path'].length > 0">
                              {{HostInfo['InstallPath']}}
                           </span>
                           <div ng-if="HostInfo['OMA']['Path'].length == 0">
                              <input class="form-control" ng-model="HostInfo['InstallPath']" />
                           </div>
                        </td>
                     </tr>
                  </table>
               </div>

               <div style="height:25px;margin-top:20px;">{{autoLanguage("硬件配置")}}</div>
               <div>
                  <table class="table loosen simple" style="color:#666;font-size:90%;">
                     <tr>
                        <td style="width:120px;font-weight:bold;">CPU</td>
                        <td>{{HostInfo['CPU'][0]['Model']}}</td>
                     </tr>
                     <tr>
                        <td style="width:120px;font-weight:bold;">{{autoLanguage("内存")}}</td>
                        <td><div progress-bar="MemoryChart"></div></td>
                     </tr>
                     <tr>
                        <td style="width:120px;font-weight:bold;">{{autoLanguage("存储容量")}}</td>
                        <td><div progress-bar="DiskChart"></div></td>
                     </tr>
                     <tr ng-repeat="net in HostInfo['Net'] track by $index">
                        <td style="width:120px;font-weight:bold;">{{autoLanguage("网络适配器")}}</td>
                        <td>{{net['Name']}}&nbsp;&nbsp;{{net['IP']}}</td>
                     </tr>
                  </table>
               </div>

               <div ng-windows="form as AddCustomPathWindow.config" windows-callback="AddCustomPathWindow.callback">
                  <div form-create para="form"></div>
               </div>
               <div style="height:25px;margin-top:20px;" ng-if="DiskTable['body'].length > 0">
                  {{autoLanguage("磁盘列表")}}
                  &nbsp;<button class="btn btn-primary" ng-if="HostInfo['errno'] == 0" ng-click="ShowAddCustomPath()">{{autoLanguage("添加自定义路径")}}</button>
               </div>
               <div style="position:relative;" ng-container="{width:'auto',height:DiskTableHeight,marginTop:5}" ng-if="DiskTable['body'].length > 0" ng-table="DiskTable['options']" table-title="DiskTable['title']" table-content="diskInfo in DiskTable['body']">
                  <div table-key="IsUse">
                     <input type="checkbox" ng-model="diskInfo['IsUse']" ng-disabled="diskInfo['CanUse']==false" ng-click="CountCheckedDisk()" />
                  </div>
                  <div class="Ellipsis" table-key="Name">{{diskInfo['Name']}}</div>
                  <div class="Ellipsis" table-key="Mount">{{diskInfo['Mount']}}</div>
                  <div class="Ellipsis" table-key="IsLocal">{{diskInfo['IsLocal']}}</div>
                  <div class="Ellipsis" table-key="Chart">
                     <div progress-bar="diskInfo['Chart']" class="ng-scope ng-isolate-scope"></div>
                  </div>
               </div>

               <!--[if IE]>
                  <style>
                     .ng-table-box{position:relative;}
                  </style>
               <![endif]-->

               <div style="height:25px;margin-top:20px;" ng-if="PortTable['body'].length > 0">
                  {{autoLanguage("端口")}}
               </div>
               <div ng-container="{width:'auto',height:PortTableHeight,marginTop:5}" ng-if="PortTable['body'].length > 0" ng-table="PortTable['options']" table-title="PortTable['title']" table-content="portInfo in PortTable['body']">
                  <div class="Ellipsis" table-key="Port">{{portInfo['Port']}}</div>
                  <div class="Ellipsis" table-key="CanUse">{{portInfo['CanUse']}}</div>
               </div>

               <div style="height:25px;margin-top:20px;" ng-if="ServiceTable['body'].length > 0">
                  {{autoLanguage("服务")}}
               </div>
               <div ng-container="{width:'auto',height:ServiceTableHeight,marginTop:5}" ng-if="ServiceTable['body'].length > 0" ng-table="ServiceTable['options']" table-title="ServiceTable['title']" table-content="serviceInfo in ServiceTable['body']">
                  <div class="Ellipsis" table-key="Name">{{serviceInfo['Name']}}</div>
                  <div class="Ellipsis" table-key="IsRunning">{{serviceInfo['IsRunning']}}</div>
                  <div class="Ellipsis" table-key="Version">{{serviceInfo['Version']}}</div>
               </div>
            </div>
         </div>
         <div class="clear-float"></div>
      </div>

      <div style="text-align:center;" ng-container="{height:30,marginTop:20}">
         <button class="btn btn-default" ng-click="GotoScanHost()"><i class="fa fa-chevron-left"></i> {{autoLanguage("上一步")}}</button>
         &nbsp;&nbsp;&nbsp;
         <button class="btn" ng-class="{'true':'btn-primary','false':'btn-danger'}[CheckedHostNum>0]" ng-click="GotoInstall()">{{autoLanguage("下一步")}} <i class="fa fa-chevron-right"></i></button>
      </div>

   </div>
   
</div>
